﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace EHR.Elements
{
    public class Person : UserControl, INotifyPropertyChanged
    {
        public event EventHandler MouseEnterMe;
        public event EventHandler MouseDownMe;

        public event PropertyChangedEventHandler PropertyChanged;

        protected void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private Brush _stroke;
        private Brush _fill;

        public Brush Stroke
        {
            get { return _stroke; }
            set { _stroke = value; NotifyPropertyChanged("Stroke"); }
        }

        public Brush Fill
        {
            get { return _fill; }
            set { _fill = value; NotifyPropertyChanged("Fill"); }
        }

        public Person()
        {
            DataContext = this;
        }

        protected void NotifyMouseEnterMe()
        {
            if (MouseEnterMe != null)
            {
                MouseEnterMe(this, EventArgs.Empty);
            }
        }

        protected void NotifyMouseDownMe()
        {
            if (MouseDownMe != null)
            {
                MouseDownMe(this, EventArgs.Empty);
            }
        }
    }
}
